package com.teamall.web.xxgl.db.arg;

import java.util.*;
import java.math.*;
import org.apache.commons.lang.*;

public class AidReportChannelArg {
    private String pk_name = "CHANNEL_ID";

    private String orderByClause;

    private String groupByClause;

    private String columns;

    private String countsql1;

    private String countsql2;

    private boolean distinct;

    private int rowStart = 0;

    private int rowEnd = 10;

    private List<AidReportChannelCriteria> oredCriteria;

    public AidReportChannelArg() {
        oredCriteria = new ArrayList<AidReportChannelCriteria>();
    }

    public void setPk_name(String pk_name) {
        this.pk_name = StringEscapeUtils.escapeSql(pk_name);
    }

    public String getPk_name() {
        return pk_name;
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = StringEscapeUtils.escapeSql(orderByClause);
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setGroupByClause(String groupByClause) {
        this.groupByClause = StringEscapeUtils.escapeSql(groupByClause);
    }

    public String geGroupByClause() {
        return groupByClause;
    }

    public void setColumns(String columns) {
        this.columns = StringEscapeUtils.escapeSql(columns);
    }

    public String geColumns() {
        return columns;
    }

    public void setCountsql1(String countsql1) {
        this.countsql1 = StringEscapeUtils.escapeSql(countsql1);
    }

    public String geCountsql1() {
        return countsql1;
    }

    public void setCountsql2(String countsql2) {
        this.countsql2 = StringEscapeUtils.escapeSql(countsql2);
    }

    public String geCountsql2() {
        return countsql2;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public void setRowStart(int rowStart) {
        this.rowStart = rowStart;
    }

    public void setRowEnd(int rowEnd) {
        this.rowEnd = rowEnd;
    }

    public int getRowStart() {
        return rowStart;
    }

    public int getRowEnd() {
        return rowEnd;
    }

    public List<AidReportChannelCriteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(AidReportChannelCriteria criteria) {
        oredCriteria.add(criteria);
    }

    public AidReportChannelCriteria or() {
    	AidReportChannelCriteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public AidReportChannelCriteria createCriteria() {
    	AidReportChannelCriteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected AidReportChannelCriteria createCriteriaInternal() {
    	AidReportChannelCriteria criteria = new AidReportChannelCriteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        groupByClause = null;
        columns = null;
        countsql1 = null;
        countsql2 = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<AidReportChannelCriterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<AidReportChannelCriterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<AidReportChannelCriterion> getAllCriteria() {
            return criteria;
        }

        public List<AidReportChannelCriterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new AidReportChannelCriterion(condition));
        }

        protected void addCriterion(String condition, Object value,
                String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property
                        + " cannot be null");
            }
            criteria.add(new AidReportChannelCriterion(condition, value));
        }

        protected void addCriterion(String condition, Object value,
                String property, int likeType) {
            if (value == null) {
                throw new RuntimeException("Value for " + property
                        + " cannot be null");
            }
            criteria.add(new AidReportChannelCriterion(condition, value, likeType));
        }

        protected void addCriterion(String condition, Object value1,
                Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property
                        + " cannot be null");
            }
            criteria.add(new AidReportChannelCriterion(condition, value1, value2));
        }

        public AidReportChannelCriteria andCriterionEqualTo(String criterion) {
            if (StringUtils.isBlank(criterion)) {
                criterion = "1=1";
            }
            addCriterion(criterion);
            return (AidReportChannelCriteria) this;
        }
        public AidReportChannelCriteria andChannelIdIsNull() {
            addCriterion("CHANNEL_ID is null");
            return (AidReportChannelCriteria) this;
        }

        public AidReportChannelCriteria andChannelIdIsNotNull() {
            addCriterion("CHANNEL_ID is not null");
            return (AidReportChannelCriteria) this;
        }

        public AidReportChannelCriteria andChannelIdEqualTo(Integer value) {
            addCriterion("CHANNEL_ID =", value, "CHANNEL_ID");
            return (AidReportChannelCriteria) this;
        }

        public AidReportChannelCriteria andChannelIdNotEqualTo(Integer value) {
            addCriterion("CHANNEL_ID <>", value, "CHANNEL_ID");
            return (AidReportChannelCriteria) this;
        }

        public AidReportChannelCriteria andChannelIdGreaterThan(Integer value) {
            addCriterion("CHANNEL_ID >", value, "CHANNEL_ID");
            return (AidReportChannelCriteria) this;
        }

        public AidReportChannelCriteria andChannelIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("CHANNEL_ID >=", value, "CHANNEL_ID");
            return (AidReportChannelCriteria) this;
        }

        public AidReportChannelCriteria andChannelIdLessThan(Integer value) {
            addCriterion("CHANNEL_ID <", value, "CHANNEL_ID");
            return (AidReportChannelCriteria) this;
        }

        public AidReportChannelCriteria andChannelIdLessThanOrEqualTo(Integer value) {
            addCriterion("CHANNEL_ID <=", value, "CHANNEL_ID");
            return (AidReportChannelCriteria) this;
        }

        public AidReportChannelCriteria andChannelIdLike(Integer value) {
            addCriterion("CHANNEL_ID like ", value, "CHANNEL_ID", 1);
            return (AidReportChannelCriteria) this;
        }

        public AidReportChannelCriteria andChannelIdNotLike(Integer value) {
            addCriterion("CHANNEL_ID  not like ", value, "CHANNEL_ID", 1);
            return (AidReportChannelCriteria) this;
        }

        public AidReportChannelCriteria andChannelIdLeftLike(Integer value) {
            addCriterion("CHANNEL_ID like ", value, "CHANNEL_ID", 0);
            return (AidReportChannelCriteria) this;
        }

        public AidReportChannelCriteria andChannelIdNotLeftLike(Integer value) {
            addCriterion("CHANNEL_ID  not like ", value, "CHANNEL_ID", 0);
            return (AidReportChannelCriteria) this;
        }

        public AidReportChannelCriteria andChannelIdRightLike(Integer value) {
            addCriterion("CHANNEL_ID like ", value, "CHANNEL_ID", 2);
            return (AidReportChannelCriteria) this;
        }

        public AidReportChannelCriteria andChannelIdNotRightLike(Integer value) {
            addCriterion("CHANNEL_ID  not like ", value, "CHANNEL_ID", 2);
            return (AidReportChannelCriteria) this;
        }

        public AidReportChannelCriteria andChannelIdIn(List<Integer> values) {
            addCriterion("CHANNEL_ID  in ", values, "CHANNEL_ID");
            return (AidReportChannelCriteria) this;
        }

        public AidReportChannelCriteria andChannelIdNotIn(List<Integer> values) {
            addCriterion("CHANNEL_ID not in ", values, "CHANNEL_ID");
            return (AidReportChannelCriteria) this;
        }

        public AidReportChannelCriteria andChannelIdBetween(Integer value1, Integer value2) {
            addCriterion("CHANNEL_ID between ", value1, value2, "CHANNEL_ID");
            return (AidReportChannelCriteria) this;
        }

        public AidReportChannelCriteria andChannelIdNotBetween(Integer value1, Integer value2) {
            addCriterion("CHANNEL_ID not between ", value1, value2, "CHANNEL_ID");
            return (AidReportChannelCriteria) this;
        }
        public AidReportChannelCriteria andChannelNameIsNull() {
            addCriterion("CHANNEL_NAME is null");
            return (AidReportChannelCriteria) this;
        }

        public AidReportChannelCriteria andChannelNameIsNotNull() {
            addCriterion("CHANNEL_NAME is not null");
            return (AidReportChannelCriteria) this;
        }

        public AidReportChannelCriteria andChannelNameEqualTo(String value) {
            addCriterion("CHANNEL_NAME =", value, "CHANNEL_NAME");
            return (AidReportChannelCriteria) this;
        }

        public AidReportChannelCriteria andChannelNameNotEqualTo(String value) {
            addCriterion("CHANNEL_NAME <>", value, "CHANNEL_NAME");
            return (AidReportChannelCriteria) this;
        }

        public AidReportChannelCriteria andChannelNameGreaterThan(String value) {
            addCriterion("CHANNEL_NAME >", value, "CHANNEL_NAME");
            return (AidReportChannelCriteria) this;
        }

        public AidReportChannelCriteria andChannelNameGreaterThanOrEqualTo(String value) {
            addCriterion("CHANNEL_NAME >=", value, "CHANNEL_NAME");
            return (AidReportChannelCriteria) this;
        }

        public AidReportChannelCriteria andChannelNameLessThan(String value) {
            addCriterion("CHANNEL_NAME <", value, "CHANNEL_NAME");
            return (AidReportChannelCriteria) this;
        }

        public AidReportChannelCriteria andChannelNameLessThanOrEqualTo(String value) {
            addCriterion("CHANNEL_NAME <=", value, "CHANNEL_NAME");
            return (AidReportChannelCriteria) this;
        }

        public AidReportChannelCriteria andChannelNameLike(String value) {
            addCriterion("CHANNEL_NAME like ", value, "CHANNEL_NAME", 1);
            return (AidReportChannelCriteria) this;
        }

        public AidReportChannelCriteria andChannelNameNotLike(String value) {
            addCriterion("CHANNEL_NAME  not like ", value, "CHANNEL_NAME", 1);
            return (AidReportChannelCriteria) this;
        }

        public AidReportChannelCriteria andChannelNameLeftLike(String value) {
            addCriterion("CHANNEL_NAME like ", value, "CHANNEL_NAME", 0);
            return (AidReportChannelCriteria) this;
        }

        public AidReportChannelCriteria andChannelNameNotLeftLike(String value) {
            addCriterion("CHANNEL_NAME  not like ", value, "CHANNEL_NAME", 0);
            return (AidReportChannelCriteria) this;
        }

        public AidReportChannelCriteria andChannelNameRightLike(String value) {
            addCriterion("CHANNEL_NAME like ", value, "CHANNEL_NAME", 2);
            return (AidReportChannelCriteria) this;
        }

        public AidReportChannelCriteria andChannelNameNotRightLike(String value) {
            addCriterion("CHANNEL_NAME  not like ", value, "CHANNEL_NAME", 2);
            return (AidReportChannelCriteria) this;
        }

        public AidReportChannelCriteria andChannelNameIn(List<String> values) {
            addCriterion("CHANNEL_NAME  in ", values, "CHANNEL_NAME");
            return (AidReportChannelCriteria) this;
        }

        public AidReportChannelCriteria andChannelNameNotIn(List<String> values) {
            addCriterion("CHANNEL_NAME not in ", values, "CHANNEL_NAME");
            return (AidReportChannelCriteria) this;
        }

        public AidReportChannelCriteria andChannelNameBetween(String value1, String value2) {
            addCriterion("CHANNEL_NAME between ", value1, value2, "CHANNEL_NAME");
            return (AidReportChannelCriteria) this;
        }

        public AidReportChannelCriteria andChannelNameNotBetween(String value1, String value2) {
            addCriterion("CHANNEL_NAME not between ", value1, value2, "CHANNEL_NAME");
            return (AidReportChannelCriteria) this;
        }

    }

    public static class AidReportChannelCriteria extends GeneratedCriteria {

        protected AidReportChannelCriteria() {
            super();
        }
    }

    public static class AidReportChannelCriterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected AidReportChannelCriterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }
        protected AidReportChannelCriterion(String condition, Object value, int likeType) {
            this.condition = condition;
            if (likeType == 0) {
                this.value = "%" + value;
            }
            else if (likeType == 1) {
                this.value = "%" + value + "%";
            }
            else {
                this.value = value + "%";
            }
            this.typeHandler = null;
            this.singleValue = true;

        }

        protected AidReportChannelCriterion(String condition, Object value,
                String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            }
            else {
                this.singleValue = true;
            }
        }

        protected AidReportChannelCriterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected AidReportChannelCriterion(String condition, Object value,
                Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected AidReportChannelCriterion(String condition, Object value,
                Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}